# a的b次方
def my_power(a,b): #不行
    for i in range(b):
        a*=a
    return a

def my_power1(a,b): #不行- -
    i = 0
    while True:
        i+=1
        a *= a
        if i==b :
            break
    return a
def my_power2(a,b): #可以
    res=1
    while True:
        if b<=0:
            break
        else:
            res=res*a
            b-=1
    return res
a=my_power2(2,3)
print(a)